home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / powerb5.zip / WWDIR.TXT < prev    next >
Text File  |  1993-06-01  |  973b  |  45 lines

  1. Sub MAIN
  2. Dim TypeArr$(4)
  3. TypeArr$(0) = "Jones Account"
  4. TypeArr$(1) = "Smith Account"
  5. TypeArr$(2) = "Personal Letters"
  6. TypeArr$(3) = "Temporary"
  7. TypeArr$(4) = "Great American Novel"
  8. TryAgain:
  9. Begin Dialog UserDialog 325, 112
  10.  Text 6, 10, 300, 18, "Project Name or Path"
  11.  ComboBox 6, 25, 200, 85, TypeArr$(), .ProjDir
  12.  OKButton 250, 80, 40, 18
  13. End Dialog
  14. Dim Project As Dialog UserDialog
  15. Dialog Project
  16. Answer$ = Project.ProjDir
  17. Select Case Project.ProjDir
  18.  Case "Jones Account"
  19.   ChDir "C:\jones"
  20.  Case "Smith Account"
  21.   ChDir "C:\smith"
  22.  Case "Personal Letters"
  23.   ChDir "C:\personal"
  24.  Case "Temporary"
  25.   ChDir "C:\temp"
  26.  Case ""
  27.   Goto TryAgain
  28.  Case Else
  29.   Err = 0
  30.   On Error Goto ErrorMsg
  31.   ChDir Answer$
  32.   Goto Done
  33. ErrorMsg:
  34.  Prompt$ = "Create Directory: " + Answer$ + " ?"
  35.  Num = MsgBox(Prompt$, "Path Not Found", 36)
  36.  If Num = - 1 Then
  37.   MkDir Answer$
  38.   ChDir Answer$
  39.  Else
  40.   Goto TryAgain
  41.  End If
  42. Done:
  43. End Select
  44. End Sub
  45.